<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8"/>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="viewport" content="target-densitydpi=640,width=1280,user-scalable=yes">
    <base href="<?php echo $system['siteRoot'];?>" />
    <title>浏览历史</title>
    <?php import_tpl("fragment/icon.php"); ?>
    <link rel="stylesheet" href="plugin/reset.css"/>
    <link rel="stylesheet" href="plugin/awesome4/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="style/common.css"/>
    <link rel="stylesheet" href="style/goods.css"/>
    <link rel="stylesheet" href="style/my-browse.css"/>
    <script src="plugin/jquery-1.11.2.min.js"></script>
    <script type="text/javascript">
    (function(){
        $(function(){
            //console.log( $('.slide .commodity'))
            $('.slide .browse').addClass('menu-normal').removeClass('menu-label')    
        })
    })()
    </script>
    <script type="text/javascript">_root='<?php echo $system['siteRoot'];?>'</script>
    <script src="script/api.js"></script>
    <script src="script/user-collection.js"></script>
</head>
<?php //var_dump($r);?>
<body>
<div id="container" class="index" data-type="browser">
    <?php import_part("custom.home","userBar"); ?>
    <?php import_part("custom.home","header"); ?>
    <?php import_tpl("fragment/nav.php"); ?>
    <div class="main-container">
        <div class="left">
            <?php import_tpl("fragment/mySlide.php"); ?>
            <div class="qr-code-box">
                <img src="images/weixin.png" alt="扫描二维码关注" title="关注我们的微信"/>
                <div>
                    <p class="weixin">扫描二维码</p>
                    <p class="concern">关注我们的微信</p>
                </div>
            </div>
        </div>
        <div class="right">
            <div class="categro">
                <div class="wap">
                    <p>浏览历史 <a href="<?php e_page('my','deleteBrowse')?>">删除所有浏览历史</a> </p>
                </div>
            </div>
            <div class="goods-plate history js-menu-love">
                <?php foreach ($r['list'] as $k => $v) {?>
                    <div class="goods" data-gopenid="<?php echo $v['gopen_id']; ?>" data-id="<?=$r['browser'][$k]['browse_id']?>">
                        <div class="goods-pic-info">
                            <a href="<?php e_page('goods','index',array('id'=>$v['gopen_id'])) ?>"><img src="<?=$v['thumb']?>" alt=""/></a>
                            <a href="<?php e_page('goods','index',array('id'=>$v['gopen_id'])) ?>"><h4><?=$v['name']?></h4></a>
                        </div>
                        <div class="price"><?=$v['price']['base_price']?></div>
                        <div class="goods-cart js-goods-cart"><a href="<?php e_page('goods','index',array('id'=>$v['gopen_id'])) ?>" title="查看详情">查看详情</a></div>
                    </div>
                <?php }?>
            </div>
            <?php if($r['page'] instanceof Page && !$r['pageEmpty']){
                $page=$r['page'];?>
            <div class="turn-page">
                <?php if($page->ifPrev()) { ?>
                <a href="<?=$page->getPageUrl($page->getPrev());?>"><i class="fa fa-chevron-left"></i>上一页</a>
                <?php }?>
                <?php foreach($page->getPageArray() as $i){ ?>
                <a href="<?=$page->getPageUrl($i);?>"><?php echo $i;?></a>
                <?php } ?>
                <?php if($page->ifNext()) { ?>
                <a href="<?=$page->getPageUrl($page->getNext());?>">下一页<i class="fa fa-chevron-right"></i></a>
                <?php }?>
            </div>
            <?php } ?>
        </div>
    </div>
    <?php import_tpl("fragment/footer.php"); ?>
</div>
</body>
</html>